AWS::Lightsail::StaticIp - AWS CloudFormation


The AWS::Lightsail::StaticIp resource specifies a static IP that can be attached to an Amazon Lightsail instance that is in the same AWS Region and Availability Zone.


To declare this entity in your AWS CloudFormation template, use the following syntax:


{ "Type" : "AWS::Lightsail::StaticIp", "Properties" : { "AttachedTo" : String, "StaticIpName" : String } }


Type: AWS::Lightsail::StaticIp Properties: AttachedTo: String StaticIpName: String



The instance that the static IP is attached to.

Required: No

Type: String

Update requires: No interruption


The name of the static IP.

Required: Yes

Type: String

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns a unique identifier for this resource.


The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.


The IP address of the static IP.


A Boolean value indicating whether the static IP is attached to an instance.


The Amazon Resource Name (ARN) of the static IP (for example, arn:aws:lightsail:us-east-2:123456789101:StaticIp/244ad76f-8aad-4741-809f-12345EXAMPLE).


An instance must be in a running state to attach a static IP

To attach a static IP to an instance, the instance must be in a running state. If the instance does not come to running state within 15 minutes after performing an attach static IP request, the attach static IP request times-out.

You can attach only one static IP to an instance

You can attach one static IP to a single instance. You cannot attach multiple static IPs to one instance. If multiple static IPs have the same instance in the AttachedTo parameter, the behavior is unpredictable and any of the static IPs (but only one) could be attached to the instance. This will cause the stack to drift because only one of the static IPs will be attached to the instance but the template will show multiple.