This file contains 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
# This is, in my opinion, the preferred way to solve this since you can have several context pointing to different accounts/environments. See: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html and https://github.com/linaro-its/aws2-wrap#use-the-credentials-via-awsconfig | |
# Uses a credential_process profile in your .aws/config file. It's this profile you will use when setting up the docker compose ecs context as the credentials_process looks up the needed credentials. | |
$ cat ~/.aws/config | |
[profile account1] | |
sso_start_url = https://d-123456789.awsapps.com/start#/ | |
sso_region = us-east-1 | |
sso_account_id = 123 | |
sso_role_name = AdministratorAccess | |
region = eu-north-1 |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Id": "key-consolepolicy-4", | |
"Statement": [ | |
{ | |
"Sid": "Enable IAM User Permissions", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::${AWS::AccountId}:root" | |
}, |
This file contains 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
Tags: | |
- Key: Name | |
Value: | |
!Join ['_', [ ec2, "Fn::ImportValue" : {"Fn::Sub":'${BaseStackName}-Environment'}, test2]] | |
#This will create a name tag with value: ec2_<yourValueFromOtherStack>_test2 |
This file contains 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
################################################## | |
### Elasticsearch host name | |
ES_HOST = "search-******************.ap-northeast-1.es.amazonaws.com" | |
### Elasticsearch prefix for index name | |
INDEX_PREFIX = "awslogs" | |
################################################# | |
### ELB access log format keys | |
ELB_KEYS = ["timestamp", "elb", "client_ip", "client_port", "backend_ip", "backend_port", "request_processing_time", "backend_processing_time", "response_processing_time", "elb_status_code", "backend_status_code", "received_bytes", "sent_bytes", "request_method", "request_url", "request_version", "user_agent"] |