confluentinc/examples

Need for AWS_PROFILE is confusing

MichaelHussey opened this issue · 1 comments

Description
I have tried the cloud_etl example which has a config variable AWS_PROFILE which is the region where the AWS resources should be created. My normal home region is eu-west-1 so that's what's in my ~/.aws/config file for my "default" profile.

However the setting in examples/cloud_etl/config/demo.cfg is "us-west-2" . This meant that while the create_rds.sh script can create a Postgres DB any further commands against that DB fail to work.

Troubleshooting
Identify any existing issues that seem related: https://github.com/confluentinc/examples/issues?q=is%3Aissue

Output when running

export DB_INSTANCE_IDENTIFIER=mictestrds
export RDS_REGION=us-west-2
export AWS_PROFILE=default
./create_rds.sh 
✔ psql installed
Creating AWS RDS PostgreSQL database

Waiting up to 1200 seconds for AWS RDS PostgreSQL database mictestrds to be available

An error occurred (DBInstanceNotFound) when calling the DescribeDBInstances operation: DBInstance mictestrds not found.
.
An error occurred (DBInstanceNotFound) when calling the DescribeDBInstances operation: DBInstance mictestrds not found.
.
An error occurred (DBInstanceNotFound) when calling the DescribeDBInstances operation: DBInstance mictestrds not found.
.
An error occurred (DBInstanceNotFound) when calling the DescribeDBInstances operation: DBInstance mictestrds not found.

I solved this by adding --region $RDS_REGION to all aws commands.

Environment

  • GitHub branch: 6.2.0-post
  • Operating System: Mac OS
  • Version of Docker: 20.10.8
  • Version of Docker Compose: 1.29.2

@MichaelHussey IIRC the idea is that the user can modify https://github.com/confluentinc/examples/blob/6.2.0-post/cloud-etl/config/demo.cfg#L29 to set it to the desired region. Have you tried doing that?

Update: after looking at #1028, I think I misunderstood the description of the issue. I don't think I had validated mismatching regions between default AWS profile and RDS region