-
Thanks for this package, it's really helpful and great! I am experiencing a strange issue, where on every app code change and deployment many IAM Statement Changes are required. I get this on every My use case is very simple: const react = new TypeScriptSource('index.tsx', {
buildOptions: {
absWorkingDir: path.join(__dirname, '../src/react')
}
});
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the kind words @moltar I'm glad this package is useful to you! The IAM Statement Changes are expected, unfortunately the details CDK provides aren't super helpful. If you look at the When you run The IAM changes you are seeing, are a reflection of the required changes to access the newly uploaded zip file from within this custom resource (and also revoking access to the previous one - the ones with I'd expect to see a pair of removed/added permissions for every Edit: We are using a new You can verify this behaviour by temporary replacing the |
Beta Was this translation helpful? Give feedback.
-
Thank you for the explanation! You are right, it does occur when using That's why there are two buckets actually, because I'm using two sources. One for static files ( Case closed then 😁 Thanks! |
Beta Was this translation helpful? Give feedback.
Thanks for the kind words @moltar I'm glad this package is useful to you!
The IAM Statement Changes are expected, unfortunately the details CDK provides aren't super helpful. If you look at the
Principal
you can see that it references aCustom::CDKBucketDeploymentXYZ/ServiceRole
. That's the role the custom Cloudformation resource uses to access the uploaded Assets.When you run
cdk deploy
, yourTypeScriptSource
gets uploaded to the CDK bucket (as created duringcdk bootstrap
) as a ZIP file. CFN then updates a parameter to reference this newly uploaded asset.@aws-cdk/aws-s3-deployment module
is implemented as a custom resource which will download that ZIP file and upload the files to the …