Skip to content

Commit

Permalink
Remove AWS Secrets Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-fawad committed Sep 30, 2024
1 parent 0fb5bf7 commit 693a0d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
3 changes: 2 additions & 1 deletion aws/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This guide will walk you through how to utilize the CloudFormation templates use
1. Download the AWS CLI following [this documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

## First Time Setup
1. Build the stacks corresponding to the files `roles.yml` and `billing.yml` through the AWS Cloud Console.
1. Build the stacks corresponding to the files `roles.yml` and `billing.yml` through the AWS Cloud Console
2. Determine the `dev` access credentials and `lambda_arn` from the `roles.yml` stack output for the next step
3. Configure the `~/.aws/config` and `~/.aws/credentials` files with the necessary data. The location of these files can be determined [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where):

Expand All @@ -24,6 +24,7 @@ aws_access_key_id = <dev_id>
aws_secret_access_key = <dev_key>
```
4. Add the following secrets to GitHub: `LAMBDA_ARN`, `DEV_ID`, `DEV_KEY`
5. Enable cloud console login for the development user by navigating to the IAM resource

**NOTE**: Upon building the `billing.yml` stack you should receive a confirmation email to verify the notification subscription

Expand Down
17 changes: 2 additions & 15 deletions aws/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,10 @@ Parameters:
Resources:
devUser:
Type: AWS::IAM::User
DependsOn:
- devUserSecret
Properties:
UserName: !Ref devUserName
LoginProfile:
Password: !Sub '{{resolve:secretsmanager:${devUserName}Password}}'
PasswordResetRequired: false

devUserSecret:
Type: AWS::SecretsManager::Secret
Properties:
Name: !Sub ${devUserName}Password
GenerateSecretString:
PasswordLength: 32
ExcludeCharacters: '"@/\'
IncludeSpace: false
RequireEachIncludedType: true
# Login profile is configured manually after stack creation to avoid the use of AWS Secrets Manager
# See SETUP.md for a guide!

lambdaFullAccessRole:
Type: AWS::IAM::Role
Expand Down

0 comments on commit 693a0d3

Please sign in to comment.