(aws cloudformation package) add support for URIs from 3rd party artifact repositories #7770
Labels
cloudformation package-deploy
feature-request
A feature should be added or improved.
p2
This is a standard priority issue
Describe the feature
The
aws cloudformation package
should optionally support the property values to be a 3rd party artifact repositories URI. When provided, the command will attempt to download the artifact from the provided URI, upload it to S3, and replace the property value with the new S3 URI.Use Case
In our CI/CD pipeline, it is common to download artifacts from an artifact repository (like Artifactory) just to upload it to S3 so it can be used by CloudFormation.
Let's take the template snippet below as an example.
At the moment, the CI/CD pipeline will have to download the artifact from the artifact repository, and store it in the same directory where the
package
command will be executed with the same name defined in the template. If there are any discrepancies, the artifact will not be found and the command will fail and ultimately so will the pipeline.Proposed Solution
It would be better developer experience if
package
command could support downloading the artifact from the provided URI and upload it to S3. The template snippet would look something like the one below:Other Information
This could be supported by adding the logic below to the export method of the Resource class found here.
In the example above, I added a conditions to check whether the support should be enabled and whether the URI provided is part of a list of approved domains, as I don't think we want the
package
command to download artifacts by default or from anywhere. With that in mind, I think we could add two optional parameters here, maybe something like:Please note: This is just an example of how it could be done. I'm sure there are other questions to be considered when actually implementing it, like how to handle authentication or options to perform any actions on the downloaded artifact before uploading it.
Acknowledgements
CLI version used
aws-cli/2.10.4
Environment details (OS name and version, etc.)
Python/3.11.2 Darwin/21.6.0 source/x86_64 prompt/off
The text was updated successfully, but these errors were encountered: