Closed berniedurfee-renaissance closed 9 months ago
Thanks for reporting @berniedurfee-renaissance . We had a temporary glitch in our CI pipeline, and this issue should be fixed in the meantime. Can you please pull the latest
LocalStack Docker image and give it another try? Please keep us posted on how it goes.. Thanks!
@whummer
Still broken for me on:
$ localstack --version
2.0.0.post1
$ samlocal --version
SAM CLI, version 1.78.0
Error:
botocore.errorfactory.InsufficientCapabilitiesException: An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_AUTO_EXPAND]
Attempted Fix:
$ localstack update docker-images
✔ Image localstack/localstack-pro:latest up-to-date.
✔ Image localstack/localstack:latest updated.
✔ Image public.ecr.aws/lambda/python:3.8-x86_64 updated.
Localstack runtime:
LocalStack version: 2.0.1.dev20230330142015
LocalStack Docker container id: 3e30e551e672
LocalStack build date: 2023-03-30
LocalStack build git hash: 49133fb
Hi @whummer any updates on getting this fixed?
It is blocking me from using localstack and creating a Team account :)
Hi @nickls, @berniedurfee-renaissance, would it be possible to post a minimal reproducible example SAM application? I'm not able to reproduce the problem with the default hello world sample application, and the same package versions you've shown.
In addition, would you mind running LocalStack with the DEBUG=1
and LS_LOG=trace
environment variables set, and post the file created by running this command:
curl http://localhost:4566/_localstack/diagnose | gzip > diagnose.json.gz
I want to check that the requests SAM makes are making it through to LocalStack correctly.
@simonrw & @whummer
This is still failing, I deleted all of my localstack docker images and got new ones:
I uninstalled localstack and samlocal and reinstalled them. I moved from using brew to pip for localstack
to see if that was the issue.
$samlocal --version
SAM CLI, version 1.78.0
$localstack --version
2.0.2
Starting Localstack:
LS_LOG=trace DEBUG=1 localstack start
Running sam:
samlocal deploy --stack-name local --resolve-s3 --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND
Issue:
botocore.errorfactory.InsufficientCapabilitiesException: An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_AUTO_EXPAND]
Test Stack: template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: An AWS Serverless Application that uses nested stack.
Resources:
ChildStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: child-stack.yaml
child-stack.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: An AWS Serverless Application that creates a hello world function.
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: hello-world/
Handler: app.lambdaHandler
Runtime: nodejs14.x
Events:
HelloWorld:
Type: Api
Properties:
Path: /hello
Method: get
hello-world/app.js
exports.lambdaHandler = async (event, context) => {
try {
var response = {
'statusCode': 200,
'body': JSON.stringify({
message: 'hello world',
})
}
} catch (err) {
console.log(err);
return err;
}
return response
};
Thanks for your help!
Not sure if it is relevant but my samlocal
and sam
are different versions:
$ sam --version
SAM CLI, version 1.84.0
$ samlocal --version
SAM CLI, version 1.78.0
Hi everyone, any updates on this case? This is blocking me. Just contributing here is what I tried:
I verified that when you remove the Transform: AWS::Serverless-2016-10-31
from the child stack the deploy works correctly on the localstack, but of course it throws an error when trying to deploy to aws
docker-compose up
)sam build
samlocal deploy --resolve-s3
Error applying changes for CloudFormation stack "sam-app": An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_AUTO_EXPAND]
macOs Big Sur
11.6.6
Intel
This issue should have been fixed in the meantime. Child stacks are now created with additional capabilities :+1: If you're still experiencing this issue after updating localstack, please let us know!
I can't deploy locally to Localstack. I always get an
InsufficientCapabilitiesException
telling me I haven't specified theCAPABILITY_AUTO_EXPAND
capability. I've used the--capabilities
commandline argument and it's specified in my config file.I can deploy this to AWS using
sam deploy
and otherwise Localstack seems to be working fine.