-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(amplify): add compute role support for Amplify app #33962
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
Changes from all commits
a9730bf
3ea34d5
ffc41e2
f173b30
745228c
97a91c0
faa392f
d9cf099
7ea2224
4a51eb9
c378d16
946a3a4
02945c1
45df95a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "Resources": { | ||
| "ComputeRole65BDBE3E": { | ||
| "Type": "AWS::IAM::Role", | ||
| "Properties": { | ||
| "AssumeRolePolicyDocument": { | ||
| "Statement": [ | ||
| { | ||
| "Action": "sts:AssumeRole", | ||
| "Effect": "Allow", | ||
| "Principal": { | ||
| "Service": "amplify.amazonaws.com" | ||
| } | ||
| } | ||
| ], | ||
| "Version": "2012-10-17" | ||
| } | ||
| } | ||
| }, | ||
| "AppRole1AF9B530": { | ||
| "Type": "AWS::IAM::Role", | ||
| "Properties": { | ||
| "AssumeRolePolicyDocument": { | ||
| "Statement": [ | ||
| { | ||
| "Action": "sts:AssumeRole", | ||
| "Effect": "Allow", | ||
| "Principal": { | ||
| "Service": "amplify.amazonaws.com" | ||
| } | ||
| } | ||
| ], | ||
| "Version": "2012-10-17" | ||
| } | ||
| } | ||
| }, | ||
| "AppF1B96344": { | ||
| "Type": "AWS::Amplify::App", | ||
| "Properties": { | ||
| "BasicAuthConfig": { | ||
| "EnableBasicAuth": false | ||
| }, | ||
| "ComputeRoleArn": { | ||
| "Fn::GetAtt": [ | ||
| "ComputeRole65BDBE3E", | ||
| "Arn" | ||
| ] | ||
| }, | ||
| "IAMServiceRole": { | ||
| "Fn::GetAtt": [ | ||
| "AppRole1AF9B530", | ||
| "Arn" | ||
| ] | ||
| }, | ||
| "Name": "App", | ||
| "Platform": "WEB_COMPUTE" | ||
| } | ||
| }, | ||
| "AppmainF505BAED": { | ||
| "Type": "AWS::Amplify::Branch", | ||
| "Properties": { | ||
| "AppId": { | ||
| "Fn::GetAtt": [ | ||
| "AppF1B96344", | ||
| "AppId" | ||
| ] | ||
| }, | ||
| "BranchName": "main", | ||
| "EnableAutoBuild": true, | ||
| "EnablePullRequestPreview": true | ||
| } | ||
| } | ||
| }, | ||
| "Parameters": { | ||
| "BootstrapVersion": { | ||
| "Type": "AWS::SSM::Parameter::Value<String>", | ||
| "Default": "/cdk-bootstrap/hnb659fds/version", | ||
| "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
| } | ||
| }, | ||
| "Rules": { | ||
| "CheckBootstrapVersion": { | ||
| "Assertions": [ | ||
| { | ||
| "Assert": { | ||
| "Fn::Not": [ | ||
| { | ||
| "Fn::Contains": [ | ||
| [ | ||
| "1", | ||
| "2", | ||
| "3", | ||
| "4", | ||
| "5" | ||
| ], | ||
| { | ||
| "Ref": "BootstrapVersion" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the compute role is used when SSR apps access AWS resources, I thought it would be more user-friendly to auto-generate it.
Ref: https://aws.amazon.com/jp/blogs/mobile/iam-compute-roles-for-server-side-rendering-with-aws-amplify-hosting/
Please let me know if you have any opinions on this.