Skip to content

Instantly share code, notes, and snippets.

@ccortezb
Last active April 8, 2021 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccortezb/61395c685e6146fe2814f1211851652b to your computer and use it in GitHub Desktop.
Save ccortezb/61395c685e6146fe2814f1211851652b to your computer and use it in GitHub Desktop.
sam-build-nlpseries3
(nlp01) ➜ comprehend-01-nlpseries-ep-3 sudo sam deploy --guided
Configuring SAM deploy
======================
Looking for samconfig.toml : Found
Reading default arguments : Success
Setting default arguments for 'sam deploy'
=========================================
Stack Name [comprehend-01-nlp-03]:
AWS Region [ca-central-1]:
#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
Confirm changes before deploy [Y/n]: Y
#SAM needs permission to be able to create roles to connect to the resources in your template
Allow SAM CLI IAM role creation [Y/n]: Y
Save arguments to samconfig.toml [Y/n]: Y
Looking for resources needed for deployment: Found!
Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-18d1u3hw3hac2
A different default S3 bucket can be set in samconfig.toml
Saved arguments to config file
Running 'sam deploy' for future deployments will use the parameters saved above.
The above parameters can be changed by modifying samconfig.toml
Learn more about samconfig.toml syntax at
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html
Deploying with following values
===============================
Stack name : comprehend-01-nlp-03
Region : ca-central-1
Confirm changeset : True
Deployment s3 bucket : aws-sam-cli-managed-default-samclisourcebucket-18d1u3hw3hac2
Capabilities : ["CAPABILITY_IAM"]
Parameter overrides : {}
Initiating deployment
=====================
Waiting for changeset to be created..
Error: Failed to create changeset for the stack: comprehend-01-nlp-03, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template error: instance of Fn::GetAtt references undefined resource HelloWorldFunctionRole
(nlp01) ➜ comprehend-01-nlpseries-ep-3 sudo sam deploy --guided
Configuring SAM deploy
======================
Looking for samconfig.toml : Found
Reading default arguments : Success
Setting default arguments for 'sam deploy'
=========================================
Stack Name [comprehend-01-nlp-03]:
AWS Region [ca-central-1]:
#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
Confirm changes before deploy [Y/n]: Y
#SAM needs permission to be able to create roles to connect to the resources in your template
Allow SAM CLI IAM role creation [Y/n]: Y
Save arguments to samconfig.toml [Y/n]: Y
Looking for resources needed for deployment: Found!
Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-18d1u3hw3hac2
A different default S3 bucket can be set in samconfig.toml
Saved arguments to config file
Running 'sam deploy' for future deployments will use the parameters saved above.
The above parameters can be changed by modifying samconfig.toml
Learn more about samconfig.toml syntax at
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html
Deploying with following values
===============================
Stack name : comprehend-01-nlp-03
Region : ca-central-1
Confirm changeset : True
Deployment s3 bucket : aws-sam-cli-managed-default-samclisourcebucket-18d1u3hw3hac2
Capabilities : ["CAPABILITY_IAM"]
Parameter overrides : {}
Initiating deployment
=====================
Uploading to comprehend-01-nlp-03/eff52ec0ae2140c2154eb8486ef244aa.template 1286 / 1286.0 (100.00%)
Waiting for changeset to be created..
CloudFormation stack changeset
------------------------------------------------------------------------------------------------------------------------------------------------
Operation LogicalResourceId ResourceType
------------------------------------------------------------------------------------------------------------------------------------------------
+ Add Comprehend01nlpseriesep3FunctionHttpPostPermis AWS::Lambda::Permission
sionProd
+ Add Comprehend01nlpseriesep3FunctionRole AWS::IAM::Role
+ Add Comprehend01nlpseriesep3Function AWS::Lambda::Function
+ Add ServerlessRestApiDeployment1449b782f7 AWS::ApiGateway::Deployment
+ Add ServerlessRestApiProdStage AWS::ApiGateway::Stage
+ Add ServerlessRestApi AWS::ApiGateway::RestApi
------------------------------------------------------------------------------------------------------------------------------------------------
Changeset created successfully. arn:aws:cloudformation:ca-central-1:[aws_account_number]:changeSet/samcli-deploy1617735990/54bf479f-01a3-49ac-a71f-30219a23f2ba
Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]: y
2021-04-06 14:06:44 - Waiting for stack create/update to complete
CloudFormation events from changeset
-------------------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus ResourceType LogicalResourceId ResourceStatusReason
-------------------------------------------------------------------------------------------------------------------------------------------------
CREATE_IN_PROGRESS AWS::IAM::Role Comprehend01nlpseriesep3FunctionRo -
le
CREATE_IN_PROGRESS AWS::IAM::Role Comprehend01nlpseriesep3FunctionRo Resource creation Initiated
le
CREATE_COMPLETE AWS::IAM::Role Comprehend01nlpseriesep3FunctionRo -
le
CREATE_IN_PROGRESS AWS::Lambda::Function Comprehend01nlpseriesep3Function Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Function Comprehend01nlpseriesep3Function -
CREATE_COMPLETE AWS::Lambda::Function Comprehend01nlpseriesep3Function -
CREATE_IN_PROGRESS AWS::ApiGateway::RestApi ServerlessRestApi -
CREATE_COMPLETE AWS::ApiGateway::RestApi ServerlessRestApi -
CREATE_IN_PROGRESS AWS::ApiGateway::RestApi ServerlessRestApi Resource creation Initiated
CREATE_IN_PROGRESS AWS::Lambda::Permission Comprehend01nlpseriesep3FunctionHt -
tpPostPermissionProd
CREATE_IN_PROGRESS AWS::ApiGateway::Deployment ServerlessRestApiDeployment1449b78 -
2f7
CREATE_COMPLETE AWS::ApiGateway::Deployment ServerlessRestApiDeployment1449b78 -
2f7
CREATE_IN_PROGRESS AWS::ApiGateway::Deployment ServerlessRestApiDeployment1449b78 Resource creation Initiated
2f7
CREATE_IN_PROGRESS AWS::Lambda::Permission Comprehend01nlpseriesep3FunctionHt Resource creation Initiated
tpPostPermissionProd
CREATE_IN_PROGRESS AWS::ApiGateway::Stage ServerlessRestApiProdStage -
CREATE_COMPLETE AWS::ApiGateway::Stage ServerlessRestApiProdStage -
CREATE_IN_PROGRESS AWS::ApiGateway::Stage ServerlessRestApiProdStage Resource creation Initiated
CREATE_COMPLETE AWS::Lambda::Permission Comprehend01nlpseriesep3FunctionHt -
tpPostPermissionProd
CREATE_COMPLETE AWS::CloudFormation::Stack comprehend-01-nlp-03 -
-------------------------------------------------------------------------------------------------------------------------------------------------
CloudFormation outputs from deployed stack
-------------------------------------------------------------------------------------------------------------------------------------------------
Outputs
-------------------------------------------------------------------------------------------------------------------------------------------------
Key ComprehendApi
Description API Gateway endpoint URL for Prod stage for Hello World function
Value https://[api_id].execute-api.ca-central-1.amazonaws.com/Prod/sentiment/
Key Comprehend01nlpseriesep3FunctionIamRole
Description Implicit IAM Role created for comprehend_01_nlpseries_ep_3 function
Value arn:aws:iam::[aws_account_number]:role/comprehend-01-nlp-03-Comprehend01nlpseriesep3Funct-1363JG49IXNQG
Key Comprehend01nlpseriesep3Function
Description comprehend_01_nlpseries_ep_3 Function ARN
Value arn:aws:lambda:ca-central-1:[aws_account_number]:function:comprehend-01-nlp-03-Comprehend01nlpseriesep3Funct-BFO9E0QBGG47
-------------------------------------------------------------------------------------------------------------------------------------------------
Successfully created/updated stack - comprehend-01-nlp-03 in ca-central-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment