This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Description: The child template needs the Arn for the task role and the bucket name for the task. | |
Parameters: | |
InputS3BucketArn: | |
Description: Parameter containing the Arn of the S3 Bucket for input | |
Type: AWS::SSM::Parameter::Value<String> | |
Default: /Yolo/Development/InputS3BucketArn | |
OutputS3BucketArn: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def get_account_id(session): | |
""" | |
Get Account Id. | |
Get the AWS account id for the current session user's credentials. | |
""" | |
client = session.client("sts") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
allocation_id=<ALLOCATION_ID> | |
metadata=169.254.169.254/latest/meta-data | |
get-region() { | |
curl -s http://$metadata/placement/availability-zone | awk '{ | |
print(substr($0, 0, length($0)-1)) | |
}' | |
} |
OlderNewer