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

fix: use dynamic arn partition for ddb provision #3142

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Object {
"Resource": Array [
Object {
"Fn::Sub": Array [
"arn:aws:dynamodb:\${AWS::Region}:\${AWS::AccountId}:table/*-\${apiId}-\${envName}",
"arn:\${AWS::Partition}:dynamodb:\${AWS::Region}:\${AWS::AccountId}:table/*-\${apiId}-\${envName}",
Object {
"apiId": Object {
"Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId",
Expand All @@ -48,7 +48,7 @@ Object {
"Effect": "Allow",
"Resource": Object {
"Fn::Sub": Array [
"arn:aws:lambda:\${AWS::Region}:\${AWS::AccountId}:function:*TableManager*",
"arn:\${AWS::Partition}:lambda:\${AWS::Region}:\${AWS::AccountId}:function:*TableManager*",
Object {},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class AmplifyDynamoModelResourceGenerator extends DynamoModelResourceGene
],
resources: [
// eslint-disable-next-line no-template-curly-in-string
cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}', {
cdk.Fn.sub('arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}', {
apiId: context.api.apiId,
envName: context.synthParameters.amplifyEnvironmentName,
}),
Expand All @@ -91,7 +91,7 @@ export class AmplifyDynamoModelResourceGenerator extends DynamoModelResourceGene
actions: ['lambda:ListTags'],
resources: [
// eslint-disable-next-line no-template-curly-in-string
cdk.Fn.sub('arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:*TableManager*', {}),
cdk.Fn.sub('arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:*TableManager*', {}),
],
}),
],
Expand Down
Loading