Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add execute_sql_rds.sh script to run SQL using RDS Data API #1847

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jamesbursa
Copy link
Collaborator

Summary

Fixes #{ISSUE}

Time to review: x mins

Changes proposed

  • Add execute_sql_rds.sh script to run SQL using RDS Data API
  • Add some sample sql files that it can use

Context for reviewers

During development, this can make it easier to run queries against the dev database.

Additional information

Screenshot 2024-04-26 at 10 39 33

Copy link
Collaborator

@chouinar chouinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good / much simpler than logging into the AWS console

Comment on lines 20 to 21
RESOURCE_ARN='arn:aws:rds:...'
SECRET_ARN='arn:aws:secretsmanager:...'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it would be an issue, but what about making these env vars (or params passed in) so someone is less likely to accidentally check in the ARNs?

Also - it would be good to know what user / role access a person has with this - can this only be the root user? Might be a problem we address later with our own login roles and what they have access to use (ie. almost anyone with AWS access can use a read-only role, only admins can write)

@jamesbursa jamesbursa marked this pull request as ready for review May 9, 2024 21:12
Copy link
Collaborator

@coilysiren coilysiren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking fancy!

GREEN='\033[92m'
END='\033[0m'

CLUSTER=api-dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CLUSTER=api-dev
# Defaults the --cluster argument to api-dev
CLUSTER=api-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants