In CDK, if I have something like this:
const repository = new ecr.Repository(this, 'SomeRepository', {
repositoryName: 'SomeRepository',
});
const lambda = new lambda.DockerImageFunction(this, 'SomeLambda, {
code: lambda.DockerImageCode.fromEcr(repository, { tag: 'latest' },
functionName: 'SomeLambda',
vpc: this.vpc,
vpcSubnets: this.vpcSubnets,
});
CDK will fail to deploy, because there is no image present in the ECR that was just barely created. The idea is to set everything up, and then setup github actions to upload the image, and tell the lambda where to get the code.
How can I get everything set up so that it is ready for CD like this?