Closed dudbbioTWANKY closed 1 year ago
You need to define acces key and access secret in your environment variables temporarily. It works after that.
$ export AWS_ACCESS_KEY_ID="your_access_key"
$ export AWS_SECRET_ACCESS_KEY="your_secret_access_key"
I run into this error "Error deploying Module 1 on main.tf line 3553" when running deploying Mod1. I have deployed this using a Amazon Linux 2 instances. I verified the the secrets are valid. Has anyone run into this?
Error: local-exec provisioner error │ │ with null_resource.populate_table, │ on main.tf line 3553, in resource "null_resource" "populate_table": │ 3553: provisioner "local-exec" { │ │ Error running command 'sed -i 's/replace-bucket-name/production-blog-awsgoat-bucket-888888888/g' resources/dynamodb/blog-posts.json │ python3 resources/dynamodb/populate-table.py │ ': exit status 1. Output: Traceback (most recent call last): │ File "/home/ubuntu/AWSGoat-DubLearn/modules/module-1/resources/dynamodb/populate-table.py", line 6, in
│ session=boto3.Session(aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'], aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'])
│ File "/usr/lib/python3.10/os.py", line 679, in getitem
│ raise KeyError(key) from None
│ KeyError: 'AWS_ACCESS_KEY_ID'