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
| # 3 important steps: | |
| # | |
| # A) Create a role for the integration (allowing PutEvents) | |
| # B) Create the integration resource (specify that role) | |
| # C) Create a route targeting that integration | |
| resource "aws_apigatewayv2_integration" "api-gw-v2-integration-to-event-bridge" { | |
| api_id = aws_apigatewayv2_api.some-api-gw-v2.id | |
| integration_type = "AWS_PROXY" | |
| integration_subtype = "EventBridge-PutEvents" |
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
| """ | |
| Main Steps: | |
| 1. Create blob for each file | |
| 2. Create tree with the blobs on top of the specific branch | |
| 3. Commit the tree | |
| 4. Update the branch to point to the new commit | |
| """ | |
| import os |
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
| name: Dynamic Matrix | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| someInput: | |
| description: 'Some input' | |
| required: true | |
| type: choice | |
| options: [ one, two, three ] |
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 | |
| session = boto3.Session( | |
| region_name='us-east-1', | |
| aws_access_key_id=AWS_ACCESS_KEY_ID, | |
| aws_secret_access_key=AWS_SECRET_ACCESS_KEY, | |
| ) | |
| session.client('s3').list_buckets() |
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
| > cat ~/.aws/config | |
| [default] | |
| region=us-east-1 | |
| aws_access_key_id=*** | |
| aws_secret_access_key=*** | |
| > aws s3 ls |
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
| > aws-vault exec some-developer -- env | grep AWS | |
| AWS_ACCESS_KEY_ID=*** | |
| AWS_SECRET_ACCESS_KEY=*** | |
| AWS_SESSION_TOKEN=*** |
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
| > aws-vault list | |
| Profile Credentials Sessions | |
| ======= =========== ======== | |
| default - - | |
| some-developer some-developer sts.GetSessionToken:8h29m31s | |
| dev - - | |
| staging - - | |
| prod - - |
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
| [default] | |
| region = us-east-1 | |
| mfa_serial = arn:aws:iam::1000:mfa/some-developer | |
| [profile some-developer] | |
| Credential_process = aws-vault export --format=json some-developer | |
| [profile dev] | |
| role_arn = arn:aws:iam::2000:role/Admin | |
| source_profile = some-developer |
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
| > aws-vault exec dev -- aws lambda invoke --function-name some-function --payload '{}' | |
| > aws-vault exec staging -- aws lambda list-functions |
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
| > aws sts get-session-token | |
| { | |
| "Credentials": { | |
| "AccessKeyId": "***", | |
| "SecretAccessKey": "***", | |
| "SessionToken": "***", | |
| ... | |
| } | |
| } |