-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(amplify): add compute role support for Amplify app #33962
base: main
Are you sure you want to change the base?
Conversation
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.
(This review is outdated)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33962 +/- ##
=======================================
Coverage 83.98% 83.98%
=======================================
Files 120 120
Lines 6976 6976
Branches 1178 1178
=======================================
Hits 5859 5859
Misses 1005 1005
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ld in `customRule` (#33973) ### Issue # (if applicable) N/A I found this problem while working on #33962. ### Reason for this change Re-running `packages/@aws-cdk/aws-amplify-alpha/test/integ.app.ts`, got the following error: ```sh Resource handler returned message: "Invalid request provided: Status field in rewrite custom rules should not be empty (Service: Amplify, Status Code: 400, Request ID: 3f3694f1-3eeb-4af3-8cdf-8b77b6387e57) (SDK Attempt Count: 1)" (RequestToken: 5748aef8-c0e1-1a1d-ab27-1bab938e0bd3, HandlerErrorCode: InvalidRequest) ``` If `status` is omitted in `customRules`, `App` cannot be deployed. ### Description of changes Specify `status` property in integ test. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes Re-ran integ test. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
/** | ||
* The IAM role for an SSR app. | ||
* The Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role's permissions. | ||
* @default undefined - a new role is created when `platform` is `Platform.WEB_COMPUTE` or `Platform.WEB_DYNAMIC`, otherwise no compute role |
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.
Please let me know if you have any opinions on this.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
Closes #33882 .
Reason for this change
To support compute role for SSR app.
Description of changes
computeRole
property.Describe any new or updated permissions being added
N/A
Description of how you validated changes
Add unit tests and an integ test.
Checklist
BREAKING CHANGE: A compute role is created when
platform
isPlatform.WEB_COMPUTE
orPlatform.WEB_DYNAMIC
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license