-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws cloudformation package should put artifacts in a local bucket #1783
Comments
I'm receiving the same error. Did anyone find a solution? |
I hope the new sam CLI version may help in resolving this issue |
Thanks for reporting @mariano-calandra-xp @miron4dev , good catch. Would you mind creating an upstream issue against sam CLI and/or aws CLI for this issue? Thanks! |
Any update on this? Is there any workaround? |
I am still experiencing this issue, any workaround? |
Hi @newtondev @MatteoGioioso , I believe this should be working with the |
@whummer I am experiencing a different error when tried with localstack CLI awslocal cloudformation package --template-file database.yaml --s3-bucket artifact-bucket --output-template-file database_out.yaml --profile localstack Unknown options: --s3-endpoint-url=http://localhost:4566 |
Thanks for the update @deepalakshmmic . Can you please try upgrading to the latest version and confirm if the problem persists?
Also, can you please report the version of the underlying
Thanks |
I'm getting the same error. awslocal --version I also tried using the aws client with the --endpoint-url on both my Windows 10 host and in WSL2. I get the same error as in the original issue report, in both environments. Versions below: aws --version aws --version |
Same problem here |
Same here, any update? |
+1 |
Encountered the same issue. Any work arounds for deploying Cloudformation stacks? We have a fairly monolithic main template.yml with a load of nested stacks. |
If you guys are trying to package a SAM template with AWS CLI, it's simply not possible ( To deploy a SAM stack to Localstack, you need to have a Cloudformation stack, which can be the output of If you want your SAM CLI to be able to package through Localstack (not the AWS cloud), it's not officially supported yet. In fact, SAM CLI won't have this feature like AWS CLI does, but, boto3 has an open PR which can provide this feature (SAM CLI uses boto3 under the hood). Doing a manual build of SAM CLI with the PR's fork of boto3 allowed me to package and deploy a SAM stack to Localstack without any interaction with the AWS cloud. |
@vincentippon I'm trying to package an AWS template (using |
@paul-uz If you're working with Cloudformation stack only, your problem is different. The author mentionned a "SAM application", which is not the same use case (SAM is not really Cloudformation). |
@vincentippon ah fair enough. Still, I'm totally unable to use Localstack at rpesent due to the issues with the cloudformation commands not working proeprly. Is there another way I can test my Lambda functions? I need to use s3, dynamodb and API Gateway (for REST API requests) |
@paul-uz Writing as much tests as you can (unit tests and integration tests) with mocks is the first step. You can manually deploy a Dynamo/s3 to Localstack with AWS CLI, use the Localstack endpoint in your lambda and invoke your lambda locally, it's not perfect but can help you a bit more. However, you should be able to deploy your Cloudformation stack to Localstack, you may want to open an issue or ask on Stackoverflow to get some help on your case. |
@vincentippon I have opened some issues, just awaiting responses :) |
@adamarla that might have to be the solution I look into until these issues are fixed. Can you clairfy what you mean by "the same docker network that localstack is on" ? Do you mean if i run localstack on my mac to run on |
Thanks for the update @adamarla @paul-uz @vincentippon @jordan-cote @ben-elsen @gsteckman . Unfortunately, the We have just released a new version
Hope that helps - we'll keep an eye on the upstream PR and add support for v2 of the AWS CLI, once the |
@whummer you are required as a reviewer to get aws/aws-cli#3309 merged in. Can you please approve it and get it merged? |
@paul-uz Done - however, I'm not a maintainer of that repo (LocalStack has no affiliation with AWS whatsoever), so not sure how much my approval will change in this case... :/ |
@whummer sorry, I saw you as a reviewer so thought you needed to approve. Looks like it still needs someone to approve it, but the PR is not assigned to a maintainer or anything :| hopefully pinged the right person now 🤞 |
I encountered this error and was aghast that the AWS CLI didn't support this feature OR document that .... Then I found localstack/localstack#1783 Hopefully the next person won't have to hunt :-)
Hi, I would like to deploy a SAM application to localstack. I have essentially 3 commands to run a
sam build
followed by asam package
andsam 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 thesam build
command. It worked. Now I have to runsam package
that is essentually an alias foraws cloudformation package
so I execute.but I get:
before to execute this command I executed
aws configure --profile localstack
and configured access and secret asdummy
andus-est-1
as 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
The text was updated successfully, but these errors were encountered: