PluginPolicyAddError: Policies cannot be added for ssm at askExecRolePermissionsQuestions #12515
Open
2 tasks done
Labels
bug
Something isn't working
custom-cdk
Issues related to custom CDK resource functionality
functions
Issues tied to the functions category
ops-errors
Operational theme: centralized error messaging
p2
How did you install the Amplify CLI?
npm i amplify -g
If applicable, what version of Node.js are you using?
v18.12.1
Amplify CLI Version
11.0.5
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
`
➜ mars git:(dev2) ✗ amplify add function
? Select which capability you want to add: Lambda function (serverless function)
? Provide an AWS Lambda function name: marsSubscribeToSf
? Choose the runtime that you want to use: NodeJS
? Choose the function template that you want to use: Hello World
Available advanced settings:
? Do you want to configure advanced settings? Yes
? Do you want to access other resources in this project from your Lambda function? Yes
? Select the categories you want this function to have access to. api, ssm
? Api has 6 resources in this project. Select the one you would like your Lambda to access mars
? Select the operations you want to permit on mars create, read, update, delete
? Select the operations you want to permit on marsSSMParameters read
PluginPolicyAddError: Policies cannot be added for ssm
at askExecRolePermissionsQuestions (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.js:133:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.createWalkthrough (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.js:53:83)
at async addFunctionResource (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/index.js:82:9)
at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/index.js:277:5)
at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:135:5)
at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:33:9)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
There was an error adding the function resource
➜ marsconnected git:(dev2) ✗ amplify add functio
`
Expected behavior
create policy, and allow read access to SSMParameters
Reproduction steps
➜ mars git:(dev2) ✗ amplify add function
? Select which capability you want to add: Lambda function (serverless function)
? Provide an AWS Lambda function name: marsSubscribeToSf
? Choose the runtime that you want to use: NodeJS
? Choose the function template that you want to use: Hello World
Available advanced settings:
? Do you want to configure advanced settings? Yes
? Do you want to access other resources in this project from your Lambda function? Yes
? Select the categories you want this function to have access to. api, ssm
? Api has 6 resources in this project. Select the one you would like your Lambda to access mars
? Select the operations you want to permit on mars create, read, update, delete
? Select the operations you want to permit on marsSSMParameters read
PluginPolicyAddError: Policies cannot be added for ssm
at askExecRolePermissionsQuestions (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.js:133:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.createWalkthrough (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.js:53:83)
at async addFunctionResource (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/provider-utils/awscloudformation/index.js:82:9)
at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-function/lib/index.js:277:5)
at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:135:5)
at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:33:9)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
There was an error adding the function resource
➜ marsconnected git:(dev2) ✗ amplify add functio
`
Project Identifier
Project Identifier: de52f9b914ddc148ef7ffbb3e2fb4ad3
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: