cloudformation-coverage-roadmap
cloudformation-coverage-roadmap copied to clipboard
`AWS::Amplify::App` - Support for specifying a `buildImage`
Name of the resource
AWS::Amplify::App
Resource name
No response
Description
Currently, one is able to specify custom build images (e.g. from ECR) in which to run the build spec of an AWS Amplify application using the AWS Console: https://docs.aws.amazon.com/amplify/latest/userguide/custom-build-image.html
However, there is no way to do so in CFN: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-buildspec. You can specify the buildSpec
, but not the buildImage
.
And hence no way to do so in the CDK: https://github.com/aws/aws-cdk/issues/15016
Other Details
No response
I recently had a similar question (#1140), and there seems to be an environment variable called _CUSTOM_IMAGE
. I haven't tried it yet, though.
Hi @david-perez , apologies for the delay here. @dbartholomae is correct, you can actually set the custom image as an environment variable _CUSTOM_IMAGE
with a value of your ECR registry. In CloudFormation, this would be something like
MyApp:
Type : AWS::Amplify::App
Properties:
EnvironmentVariables:
- Name: _CUSTOM_IMAGE
Value: 1234.ecr.aws/foo/build-image.al2-20220929223003
While _CUSTOM_IMAGE
works, it's not documented: https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html
+1