Kotaimen / awscfncli

Friendly AWS CloudFormation CLI
MIT License
58 stars 12 forks source link

Allow for customization of the S3 Bucket #57

Closed mkielar closed 5 years ago

mkielar commented 5 years ago

In #11, you mentioned that in 2.x it will be possible to customize the S3 bucket used by cloudformation package. Yet I cannot find the option to do so, and the code section responsible for the bucket name doesn't look promising either.

Can I please have a way of customizing the S3 bucket? I'm currently on 0.5x using cloudformation package as a separate call, and then running cfn to get he log tail, and I'm starting migration to 2.x, but this is what is blocking me currently from fully migrating to sync command.

Kotaimen commented 5 years ago

Hi @mkielar: Yes, this feature is already implemented in 2.0 and later, you can overwrite the bucket using ArtifactStore parameter:

Stages:

  Develop:
    ApiBackend-Develop:
    Template: template.yaml
    Capabilities: [CAPABILITY_IAM]
    Package: true
    Region: us-east-1
    ArtifactStore: awscfncli-1234567890-custom-artifact-bucket

Note awscfncli won't create custom bucket automatically and the bucket must be in the same region with your stack.

mkielar commented 5 years ago

Oh, thanks. The buckets are already there with encryption, short retention policy, etc, which is why I want to reuse them. You may want to improve the docs, as this feature seems to be missing, and this issue can be closed.

By the way, sync works beautifully, thanks for the great tool.

mkielar commented 5 years ago

I'm reopening this, as I will need an option to pass the bucket name as a command line parameter.

This is a case where I have to run exactly same CF Stack on multiple different AWS Accounts, and can only make use of already existing buckets. With current approach, I'd have to keep separate configuration files for each account, and they would only differ by the ArtifactStore value.

With 0.5x I explicitly used aws cloudformation pacakge folllowed by cfn changeset execute to achieve this, but currently with sync this doesn't seem possible.

mkielar commented 5 years ago

I'm wondering if you'd consider merging a pull request?

Kotaimen commented 5 years ago

@GlieseRay please release the pull request as a hot fix 2.0.x.

GlieseRay commented 5 years ago

Hi @Marcin, I have released a new 2.0.5 release. Please check.

On Fri, Nov 30, 2018 at 9:43 PM Kotaimen notifications@github.com wrote:

@GlieseRay https://github.com/GlieseRay please release the pull request with a hot fix of 2.0.x.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kotaimen/awscfncli/issues/57#issuecomment-443401955, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCGXwfjebqTb_XoA1O9W75h2yx3H5cQks5u0hb5gaJpZM4Y5kLI .

mkielar commented 5 years ago

Works as expected. Thanks!