Skip to content

Commit f1a3eed

Browse files
committed
Add IAM policy for ECR and App Runner permissions fix
1 parent 462f87f commit f1a3eed

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

DEPLOYMENT_CHECKLIST.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Production Deployment Checklist for AWS App Runner
22

3+
## 🔐 URGENT: Credentials Security Update
4+
5+
### Current Status (August 20, 2025):
6+
- ⚠️ **EXPOSED KEYS**: `AKIASE3CDFQSGGXR5YLB` dan `AKIASE3CDFQSGZA4NX6Z`
7+
- 🚨 **ACTION REQUIRED**: Delete exposed keys immediately
8+
-**GitHub Actions**: Workflow ready, waiting for fresh credentials
9+
-**ECR Image**: Available at `147845229604.dkr.ecr.ap-southeast-2.amazonaws.com/permit-api:latest`
10+
11+
### Immediate Action Plan:
12+
1. **AWS Console** → IAM → Delete exposed access keys
13+
2. **Create new access key** (3rd generation)
14+
3. **Update GitHub Secrets**: AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY
15+
4. **Verify workflow**: Check GitHub Actions success with new credentials
16+
5. **Deploy App Runner**: Use ECR image URI with fresh credentials
17+
318
## 🚀 Pre-Deployment Checklist
419

520
### Code Preparation

iam-policy-apprunner-ecr.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"ecr:GetAuthorizationToken"
8+
],
9+
"Resource": "*"
10+
},
11+
{
12+
"Effect": "Allow",
13+
"Action": [
14+
"ecr:BatchCheckLayerAvailability",
15+
"ecr:GetDownloadUrlForLayer",
16+
"ecr:BatchGetImage",
17+
"ecr:DescribeRepositories",
18+
"ecr:CreateRepository",
19+
"ecr:PutImage",
20+
"ecr:InitiateLayerUpload",
21+
"ecr:UploadLayerPart",
22+
"ecr:CompleteLayerUpload",
23+
"ecr:DescribeImages",
24+
"ecr:ListImages"
25+
],
26+
"Resource": "arn:aws:ecr:ap-southeast-2:147845229604:repository/permit-api"
27+
},
28+
{
29+
"Effect": "Allow",
30+
"Action": [
31+
"apprunner:CreateService",
32+
"apprunner:UpdateService",
33+
"apprunner:DeleteService",
34+
"apprunner:DescribeService",
35+
"apprunner:ListServices",
36+
"apprunner:StartDeployment",
37+
"apprunner:ListOperations"
38+
],
39+
"Resource": "*"
40+
},
41+
{
42+
"Effect": "Allow",
43+
"Action": [
44+
"iam:CreateRole",
45+
"iam:AttachRolePolicy",
46+
"iam:PassRole"
47+
],
48+
"Resource": [
49+
"arn:aws:iam::147845229604:role/AppRunnerECRAccessRole*",
50+
"arn:aws:iam::147845229604:role/service-role/AppRunnerECRAccessRole*"
51+
]
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)