Skip to content

Commit d3a780c

Browse files
author
Yuriy Bezsonov
committed
feat(java-on-aws-infra): update IAM policies and add EC2 network permissions
1 parent 715393b commit d3a780c

6 files changed

Lines changed: 20 additions & 6 deletions

File tree

infra/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CDK project for generating CloudFormation templates for AWS workshops. Uses a un
66

77
```bash
88
# Generate all CloudFormation templates
9-
npm run generate
9+
npm run gen
1010

1111
# Sync templates to workshop directories
1212
npm run sync

infra/cdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CDK project for generating CloudFormation templates for AWS workshops.
66

77
```bash
88
# Generate all CloudFormation templates
9-
npm run generate
9+
npm run gen
1010

1111
# Sync templates to workshop directories
1212
npm run sync

infra/cdk/src/main/resources/iam-policy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
],
112112
"Resource": [
113113
"arn:aws:iam::{{.AccountId}}:role/aiagent*",
114-
"arn:aws:iam::{{.AccountId}}:role/mcp*"
114+
"arn:aws:iam::{{.AccountId}}:role/mcp*",
115+
"arn:aws:iam::{{.AccountId}}:role/backoffice*"
115116
],
116117
"Condition": {
117118
"StringEquals": {

infra/cdk/src/main/resources/workshop-boundary.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"cloudfront:*",
1515
"cloudwatch:*",
1616
"dynamodb:*",
17+
"ec2:CreateNetworkInterface",
18+
"ec2:DeleteNetworkInterface",
19+
"ec2:DescribeNetworkInterfaces",
20+
"ec2:DescribeSecurityGroups",
21+
"ec2:DescribeSubnets",
22+
"ec2:DescribeVpcs",
1723
"ecr:*",
1824
"lambda:InvokeFunction",
1925
"logs:*",

infra/cfn/java-ai-agents-stack.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ Resources:
378378
Fn::GetAtt:
379379
- CodeBuildRoleE9A44575
380380
- Arn
381-
ContentHash: "1769679323540"
381+
ContentHash: "1769949962117"
382382
ProjectName:
383383
Ref: CodeBuildProjectA0FF5539
384384
ServiceToken:
@@ -1707,6 +1707,7 @@ Resources:
17071707
Effect: Allow
17081708
Resource:
17091709
- !Sub arn:aws:iam::${AWS::AccountId}:role/aiagent*
1710+
- !Sub arn:aws:iam::${AWS::AccountId}:role/backoffice*
17101711
- !Sub arn:aws:iam::${AWS::AccountId}:role/mcp*
17111712
Sid: AiAgentCreateRoles
17121713
- Action: iam:PassRole
@@ -1781,6 +1782,12 @@ Resources:
17811782
- cloudwatch:*
17821783
- cognito-idp:*
17831784
- dynamodb:*
1785+
- ec2:CreateNetworkInterface
1786+
- ec2:DeleteNetworkInterface
1787+
- ec2:DescribeNetworkInterfaces
1788+
- ec2:DescribeSecurityGroups
1789+
- ec2:DescribeSubnets
1790+
- ec2:DescribeVpcs
17841791
- ecr:*
17851792
- lambda:InvokeFunction
17861793
- logs:*
@@ -2039,7 +2046,7 @@ Resources:
20392046
- Ref: AWS::AccountId
20402047
- "-"
20412048
- Ref: AWS::Region
2042-
- "-20260129103523"
2049+
- "-20260201134602"
20432050
PublicAccessBlockConfiguration:
20442051
BlockPublicAcls: true
20452052
BlockPublicPolicy: true

infra/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "Unified AWS workshop infrastructure",
55
"scripts": {
6-
"generate": "./scripts/cfn/generate.sh",
6+
"gen": "./scripts/cfn/generate.sh",
77
"sync": "./scripts/cfn/sync.sh"
88
},
99
"author": "",

0 commit comments

Comments
 (0)