Skip to main content

launch_configurations

Creates, updates, deletes or gets a launch_configuration resource or lists launch_configurations in a region

Overview

Namelaunch_configurations
TypeResource
DescriptionThe AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
Idawscc.autoscaling.launch_configurations

Fields

NameDatatypeDescription
placement_tenancystringThe tenancy of the instance, either default or dedicated.
security_groupsarrayA list that contains the security groups to assign to the instances in the Auto Scaling group.
launch_configuration_namestringThe name of the launch configuration. This name must be unique per Region per account.
metadata_optionsobjectThe metadata options for the instances.
instance_idstringThe ID of the Amazon EC2 instance you want to use to create the launch configuration.
user_datastringThe Base64-encoded user data to make available to the launched EC2 instances.
classic_link_vpc_security_groupsarrayThe IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
block_device_mappingsarraySpecifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
iam_instance_profilestringProvides the name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role.
kernel_idstringProvides the ID of the kernel associated with the EC2 AMI.
associate_public_ip_addressbooleanFor Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to assign a public IP address to the group's instances.
classic_link_vpc_idstringThe ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
ebs_optimizedbooleanSpecifies whether the launch configuration is optimized for EBS I/O (true) or not (false).
key_namestringProvides the name of the EC2 key pair.
spot_pricestringThe maximum hourly price you are willing to pay for any Spot Instances launched to fulfill the request.
image_idstringProvides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.
instance_typestringSpecifies the instance type of the EC2 instance.
ram_disk_idstringThe ID of the RAM disk to select.
instance_monitoringbooleanControls whether instances in this group are launched with detailed (true) or basic (false) monitoring.
regionstringAWS region.

For more information, see AWS::AutoScaling::LaunchConfiguration.

Methods

NameResourceAccessible byRequired Params
create_resourcelaunch_configurationsINSERTImageId, InstanceType, region
delete_resourcelaunch_configurationsDELETEIdentifier, region
list_resourceslaunch_configurations_list_onlySELECTregion
get_resourcelaunch_configurationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual launch_configuration.

SELECT
region,
placement_tenancy,
security_groups,
launch_configuration_name,
metadata_options,
instance_id,
user_data,
classic_link_vpc_security_groups,
block_device_mappings,
iam_instance_profile,
kernel_id,
associate_public_ip_address,
classic_link_vpc_id,
ebs_optimized,
key_name,
spot_price,
image_id,
instance_type,
ram_disk_id,
instance_monitoring
FROM awscc.autoscaling.launch_configurations
WHERE
region = '{{ region }}' AND
Identifier = '{{ launch_configuration_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new launch_configuration resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.autoscaling.launch_configurations (
ImageId,
InstanceType,
region
)
SELECT
'{{ image_id }}',
'{{ instance_type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.autoscaling.launch_configurations
WHERE
Identifier = '{{ launch_configuration_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the launch_configurations resource, the following permissions are required:

autoscaling:DescribeLaunchConfigurations