Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

aws cloudformation package should put artifacts in a local bucket #1783

@mariano-calandra-xp

Description

@mariano-calandra-xp

Hi, I would like to deploy a SAM application to localstack. I have essentially 3 commands to run a sam build followed by a sam package and sam deploy. The second command upload artifacts to S3 and I would like to have this bucket simulated locally.

So I created it aws s3api create-bucket --bucket my-bucket --endpoint-url http://localhost:4572 and then I executed the sam build command. It worked. Now I have to run sam package that is essentually an alias for aws cloudformation package so I execute.

aws cloudformation package \
    --output-template-file packaged.yml \
    --endpoint-url http://localhost:4581 \ 
    --profile localstack \
    --s3-bucket my-bucket \
    --template-file template.yaml

but I get:

Unable to upload artifact XXX referenced by CodeUri parameter of XXX resource.
An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.

before to execute this command I executed aws configure --profile localstack and configured access and secret as dummy and us-est-1as defult region.

Can I use local s3 for this or do I need a real S3 bucket?

┆Issue is synchronized with this Jira Bug by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions