Created
May 1, 2017 16:52
-
-
Save halferty/ab657cde10beccb31ba415855bbd7aa4 to your computer and use it in GitHub Desktop.
Test SQS push with EC2 temporary credentials
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
| (export AWS_ACCESS_KEY_ID=$(ruby -e "require \"json\"; puts JSON.parse(\`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<IAM group>\`)[\"AccessKeyId\"]"); export AWS_SECRET_ACCESS_KEY=$(ruby -e "require \"json\"; puts JSON.parse(\`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<IAM group>\`)[\"SecretAccessKey\"]"); export AWS_SESSION_TOKEN=$(ruby -e "require \"json\"; puts JSON.parse(\`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<IAM group>\`)[\"Token\"]"); export AWS_DEFAULT_REGION="us-east-1"; aws sqs send-message --queue-url "https://sqs.us-east-1.amazonaws.com/<rest of queue URL>" --message-body "Test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment