TagSpecifications

0

Hi. I am trying to add tags when an SSM Automation script creates an AMI of an EC2 instance. How am I supposed to use the TagSpecifications input?

  • Hello. Can you give more context for this question? Are you using a custom document? What step are you creating the instance with (ex: aws:executeScript)? What API are you calling with the TagSpecifications input?

1개 답변
0

If you are planning to tag AMIs while using the CreateImage API with "aws:executeAwsApi" action in SSM Automation, then you can specify "TagSpecifications" as follows:

Sample:-

schemaVersion: '0.3'
parameters:
  instance:
    type: String
mainSteps:
  - name: CreateImage
    action: aws:executeAwsApi
    isEnd: true
    inputs:
      Service: ec2
      Api: CreateImage
      InstanceId: '{{ instance }}'
      Name: 'TestAMI'
      TagSpecifications:
        - ResourceType: image
          Tags:
            - Key: Name
              Value: SSM
AWS
지원 엔지니어
Aamir_H
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠