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

Remove AWS_ACCESS_KEY, AWS_SECRET_KEY environment variable #196

Open
1 of 3 tasks
moreal opened this issue Aug 30, 2022 · 0 comments
Open
1 of 3 tasks

Remove AWS_ACCESS_KEY, AWS_SECRET_KEY environment variable #196

moreal opened this issue Aug 30, 2022 · 0 comments
Assignees
Labels
bridge An issue or a pull request related to bridge

Comments

@moreal
Copy link
Collaborator

moreal commented Aug 30, 2022

  • Test IAM Role in EC2 instance with docker compose. (Testing)
  • Remove AWS_ACCESS_KEY, AWS_SECRET_KEY environment variables. (Coding)
  • Deploy.

Test IAM Role in EC2 instance with docker compose

  1. Make policy
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "kms:Sign",
            "Resource": "arn:aws:kms:us-east-2:<ACCOUNT_ID>:key/<KEY_ID>"
        }
    ]
}
  1. Make IAM Role
  2. Make KMS
  3. Allow IAM Role as KMS user
  4. Make EC2 instance
  5. Bind IAM role to EC2 instance
  6. Run docker-compose up -d
version: '3'
services:
  9c-headless:
    image: ubuntu
    command: sleep 10000
  1. Attach to D
docker run -it <container_ name> /bin/bash
  1. Install awscli
apt update && apt upgrade && apt install -y awscli
  1. Run the command
aws kms --region us-east-2 sign --key-id <KEY_ID> --message aaa --signing-algorithm ECDSA_SHA_256

It doesn't use aws configure so I think they can be removed well.

But the above thing was too simple so I'm not sure the policy's permissions 🤔 I think it should prepare local testing.

@moreal moreal added the bridge An issue or a pull request related to bridge label Aug 30, 2022
@moreal moreal self-assigned this Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge An issue or a pull request related to bridge
Projects
Archived in project
Development

No branches or pull requests

1 participant