Open tk421 opened 6 years ago
did you run aws configure
?
did you run aws configure?
@thesunlover yes. I can interact with aws over the cli without any problem.
I am having the same problem. Did you fixed it?
@progerjkd I found a workaround.
File zappa_settings.json
"dev": {
"app_function": "blog.app",
"aws_region": "ap-southeast-2",
"profile_name": "default",
"project_name": "serverless-blog",
"runtime": "python2.7",
"s3_bucket": "taromba-sb",
"manage_roles": false,
"role_name": "MyLambdaRole",
"role_arn": "arn:aws:iam::800000000:role/my-role-name-dev-ZappaLambdaExecutionRole"
}
}
You just need to create the role in AWS IAM to get the the correct value for role_arn
. Those are the permissions that I am currently using for testing purposes.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:CreateNetworkInterface",
"ec2:DescribeInstances",
"ec2:DetachNetworkInterface",
"xray:PutTelemetryRecords",
"ec2:DescribeNetworkInterfaces",
"lambda:InvokeFunction",
"ec2:ResetNetworkInterfaceAttribute",
"ec2:ModifyNetworkInterfaceAttribute",
"ec2:DeleteNetworkInterface",
"route53:*",
"ec2:AttachNetworkInterface",
"xray:PutTraceSegments"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "logs:*",
"Resource": "arn:aws:logs:*:*:*"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::*"
},
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": "kinesis:*",
"Resource": "arn:aws:kinesis:*:*:*"
},
{
"Sid": "VisualEditor4",
"Effect": "Allow",
"Action": "sns:*",
"Resource": "arn:aws:sns:*:*:*"
},
{
"Sid": "VisualEditor5",
"Effect": "Allow",
"Action": "sqs:*",
"Resource": "arn:aws:sqs:*:*:*"
},
{
"Sid": "VisualEditor6",
"Effect": "Allow",
"Action": "dynamodb:*",
"Resource": "*"
}
]
}
Dynamo DB Incorrect permissions
When deploying a zappa application based in this post, with the following zappa_settings.json
and make zappa deploy, it starts the deployment but eventually fails with the following error:
Zappa creates a IAM policy called _zappapermissions that contains the following code for DynamoDB
And those permissions does not allow to execute the action ListTables which is needed in the deployment process.
Python 2.7
Expected Behavior
After running zappa deploy, the deployment should be successful.
Actual Behavior
zappa tail
Possible Fix
Make sure that zappa-permissions creates the correct values. More broader permissions works, but this gets override by zappa all the time - it would be best to tailor those permissions to what is actually needed.
Steps to Reproduce
Your Environment
Zappa version used: 0.47.0
Operating System and Python version: Ubuntu Xenial
The output of
pip freeze
: argcomplete==1.9.3 blinker==1.4 boto3==1.9.23 botocore==1.12.23 certifi==2018.10.15 cfn-flip==1.0.3 chardet==3.0.4 Click==7.0 docutils==0.14 durationpy==0.5 Flask==1.0.2 Flask-Blogging==1.1.0 Flask-Caching==1.4.0 Flask-FileUpload==0.5.0 Flask-Login==0.4.1 Flask-LoginManager==1.1.6 Flask-Principal==0.4.0 Flask-WTF==0.14.2 future==0.16.0 futures==3.2.0 hjson==3.0.1 idna==2.7 itsdangerous==0.24 Jinja2==2.10 jmespath==0.9.3 kappa==0.6.0 lambda-packages==0.20.0 Markdown==3.0.1 MarkupSafe==1.0 pkg-resources==0.0.0 placebo==0.8.2 python-dateutil==2.7.3 python-slugify==1.2.6 PyYAML==3.13 requests==2.19.1 s3transfer==0.1.13 shortuuid==0.5.0 six==1.11.0 SQLAlchemy==1.2.12 toml==0.10.0 tqdm==4.19.1 troposphere==2.3.3 Unidecode==1.0.22 urllib3==1.23 Werkzeug==0.14.1 wsgi-request-logger==0.4.6 WTForms==2.2.1 zappa==0.47.0Link to your project (optional):
Your
zappa_settings.py
: { "dev": { "app_function": "blog.app", "aws_region": "ap-southeast-2", "profile_name": "default", "project_name": "serverless-blog", "runtime": "python2.7", "s3_bucket": "taromba-sb" } }