mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-01 06:23:16 +00:00
Merge pull request #35 from Sea-Haven-Industries/codex/sh133-s3-read-fix
Fix Elastic Beanstalk bundle validation
This commit is contained in:
commit
8f41190a74
2 changed files with 5 additions and 3 deletions
|
|
@ -41,8 +41,10 @@ The role grants only:
|
|||
- `elasticbeanstalk:CreateApplicationVersion` on application `shoc-backend`.
|
||||
- `elasticbeanstalk:UpdateEnvironment` on environment `shoc-backend-dev` only.
|
||||
- `s3:ListBucket` on `elasticbeanstalk-us-east-1-396287094661` (the official
|
||||
action's ownership-safe `HeadBucket` check) and `s3:PutObject` only under the
|
||||
`shoc-backend/` object prefix.
|
||||
action's ownership-safe `HeadBucket` check). Under the `shoc-backend/` object
|
||||
prefix only: `s3:PutObject` plus `s3:GetObject` and `s3:GetObjectVersion`,
|
||||
which the pinned official deployment action requires to validate the
|
||||
`CreateApplicationVersion` source bundle after upload.
|
||||
|
||||
It grants **no** IAM mutation or `PassRole`, **no** RDS / EC2 / Secrets Manager
|
||||
access, and **no** administrator policy. There are no wildcard mutation
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export class DeployDevStack extends cdk.Stack {
|
|||
deployRole.addToPolicy(
|
||||
new iam.PolicyStatement({
|
||||
effect: iam.Effect.ALLOW,
|
||||
actions: ['s3:PutObject'],
|
||||
actions: ['s3:GetObject', 's3:GetObjectVersion', 's3:PutObject'],
|
||||
resources: [`${bucketArn}/${APPLICATION_NAME}/*`],
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue