aws / aws/chalice

Use config.json with chalice package

Open
#925 2 comments 0 reactions 0 assignees View on GitHub
confusing-error feature-request
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

I want to deploy my package with chalice package in order to use CloudFormation https://chalice.readthedocs.io/en/latest/topics/cfn.html?highlight=package

it seem that the job don't use my config.json to use the arn role I expect

"manage_iam_role" : false,
"iam_role_arn" : "arn:aws:iam:*********

because sam.json is generated with an DefaultRolePolicy

cmd : chalice package ./tmp2 --stage prod

config.json :
{
"version": "2.0",
"app_name": "XXXXXXX",
"stages": {
"dev": {
"api_gateway_stage": "api",
"lambda_timeout": 120,
"lambda_memory_size": 1024,
"manage_iam_role" : false,
"iam_role_arn" : "arn:aws:iam::*********:role/lambda_dynamodb_s3"
}},
"prod": {
"api_gateway_stage": "api",
"lambda_timeout": 120,
"lambda_memory_size": 1024,
"manage_iam_role" : false,
"iam_role_arn" : "arn:aws:iam::**********:role/lambda_dynamodb_s3"
}
}

Contributor guide

Open the contributing guide

Research direction

Reproduce `chalice package ./tmp2 --stage prod` with the supplied `config.json`, then compare the generated `sam.json` with the stage's `manage_iam_role` and `iam_role_arn` settings. Trace how `chalice package` loads stage configuration; done means the generated CloudFormation template uses the configured role and does not add the unexpected `DefaultRolePolicy`.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.