aws-samples / amazon-dynamodb-labs

Hands on workshop and design scenarios for Amazon DynamoDB
https://catalog.workshops.aws/dynamodb-labs
Apache License 2.0
165 stars 114 forks source link

Adding TOKEN as header to curl command for INSTANCE_ROLE and Region #119

Closed rishij39 closed 2 months ago

rishij39 commented 2 months ago

Issue #, if available: credential.sh was failing to set INSTANCE_ROLE and Region env variables Description of changes: Adding TOKEN as header to curl command for INSTANCE_ROLE and Region

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

tebanieo commented 2 months ago

I confirmed the current credentials.sh is returning an error

WSParticipantRole:~/environment/OpenSearchPipeline $ . ./credentials.sh 
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
METADATA_AWS_ACCESS_KEY_ID: 
METADATA_AWS_SECRET_ACCESS_KEY: 
METADATA_AWS_SESSION_TOKEN: 
METADATA_AWS_REGION: 
METADATA_AWS_ROLE: <REDACTED>role/ddb-Cloud9Role-0WaehjdX3PJC

and the suggested solution will fix it.

WSParticipantRole:~/environment/OpenSearchPipeline $ . ./credentials.sh 
METADATA_AWS_ACCESS_KEY_ID: ASIA3Q<REDACTED>
METADATA_AWS_SECRET_ACCESS_KEY: gsY3jAXO<REDACTED>
METADATA_AWS_SESSION_TOKEN: <REDACTED>
METADATA_AWS_REGION: us-west-2
METADATA_AWS_ROLE: <REDACTED>role/ddb-Cloud9Role-0WaehjdX3PJC