feat: grant S3 bucket access to EC2 instance role for document storage management
This commit is contained in:
parent
420469dc9e
commit
3713bcdee2
1 changed files with 15 additions and 0 deletions
|
|
@ -113,6 +113,21 @@ export class AwsCdkStack extends cdk.Stack {
|
|||
],
|
||||
}));
|
||||
|
||||
// S3 access for Betasupplierdocument storage
|
||||
role.addToPolicy(new iam.PolicyStatement({
|
||||
actions: [
|
||||
's3:ListBucket',
|
||||
's3:GetBucketLocation',
|
||||
's3:GetObject',
|
||||
's3:PutObject',
|
||||
's3:DeleteObject',
|
||||
],
|
||||
resources: [
|
||||
'arn:aws:s3:::betasupplierdocument-764709663363-ap-south-2-an',
|
||||
'arn:aws:s3:::betasupplierdocument-764709663363-ap-south-2-an/*',
|
||||
],
|
||||
}));
|
||||
|
||||
// 3. Define the EC2 Instance (t4g.medium)
|
||||
const instance = new ec2.Instance(this, 'internalsInstance', {
|
||||
vpc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue