How to deploy AWS SAM appllication from AWS console - amazon-web-services

When I deploy my AWS SAM application from the command line with sam deploy, it works fine.
When I try to deploy it from my corporate account I cannot do it from the command line. in the AWS console, I get the following error:
Any suggestion?

Related

Unable to deploy pipeline to AWS CI/CD account

I am trying to deploy pipeline to CI/CD account. However I'm getting below error.
npm run cdk deploy LandingPagePipelineStack -- --profile cicd
> landingpage#0.3.13 cdk
> cdk deploy LandingPagePipelineStack --profile cicd
Failed to get credentials for "cicd" profile. Make sure to run "aws configure sso --profile cicd && aws sso login --profile cicd"
I have also tried to logged in using below command and it was successful.
aws configure sso --profile cicd && aws sso login --profile cicd
I'm following step number 5 at AWS tutorial.
Please help me to deploy pipeline to CI/CD account.
After you execute the command in the output (aws configure sso --profile cicd && aws sso login --profile cicd) you should be able to simply execute npm run cdk deploy LandingPagePipelineStack -- --profile cicd
Make sure that any time you want to execute cdk with sso context, that you have active temp credentials, by executing sso login

How to run codepipeline from AWS chatbot

I'm trying to run AWS codepipeline from slack using AWS chatbot feature. I've configured a chatbot properly and it is giving me appropriate response when I'm running a command
#aws codepipeline list-pipelines --region us-east-1
With this command it is showing me all the configured codepipelines in my AWS account.
However when I'm trying to run a pipeline using
#aws codepipeline start-pipeline-execution --name dev-pipeline
I'm getting following error.
I can't run the command codepipeline start-pipeline-execution because it isn't enabled.
There's no option I can see in AWS Chatbot to enable this pipeline.
I'm able to run this same pipeline using AWS CLI and its working perfectly fine.
Can someone please give me any pointer to configure AWS Chatbot from Slack to run AWS Codepipeline?

AWS SAM deployed Error under hello world template

I'm currently working on AWS serverless lambda function deployment and try to distribute and test with AWS SAM. However, when I followed the AWS SAM hello world template tutorial on official website, I can't really deploy my code to AWS.
I've already
Assigned a working IAM account
Install every package we need for AWS SAM (brew, aws-sam-cli...etc)
Set up AWS configuration
Using a function template provided by AWS
Yet, I got error message
Error: Stack aws-sam-cli-managed-default is missing Tags and/or
Outputs information and therefore not in a healthy state (Current
state:aws-sam-cli-managed-default). Failing as the stack was likely
not created by the AWS SAM CLI
Took me a minute to figure out too.
Open up CloudFormation in AWS and delete the aws-sam-cli-managed-default stack then try to redeploy.
Every time your deploy fails you'll likely have to do this again.
It's aws credentials error - because you not configure it right or not config at all.
If you didn't have aws cli installed on your computer, find aws cli installer for
your filesystem, for mac it's https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html.
Go to https://console.aws.amazon.com/iam and create new user with AdministratorAccess permission and get aws_access_key_id and aws_secret_access_key.
Go to your terminal and type aws configure.
Enter your credentials.
Try to run sum build && sum deploy --guided
Now it's need to work.
Like #Eli Meiler says, it may well be a credential issue. If you need to see more details here try
$ aws cloudformation describe-change-set --change-set-name InitialCreation --stack-name aws-sam-cli-managed-default
...FAILED User: arn:aws:iam::123:user/<human user> is not authorized to perform:
cloudformation:CreateChangeSet
on resource: arn:aws:cloudformation:eu-central-1:aws:transform/Serverless-2016-10-31
with an explicit deny in an identity-based policy
EDIT
Even though I had full permissions in that AWS account, what I was not aware was that MFA / 2-factor auth is kinda troublesome here.
The advice that worked for me was this github comment to
generate an sts token
set the env vars and
then try sam deploy --guided again
$ aws sts get-session-token --serial-number arn:aws:iam::<account_id>:mfa/<human.user> --duration-seconds 15000 --token-code 123456

AWS Cli command to get "AWS CLI Export"

When EMR Cluster has been provisioned, I want to get the "AWS CLI Export" output using aws cli command.
Please let me know if someone has an idea to get aws cli export output through aws cli command

In the elastic beanstalk, I get the message 'Service: Amazon S3, Message: Forbidden'

My eb is currently on the docker platform and will read the Dockerrun.aws.json file on s3.
There is no problem when deploying from the web console, but deploying in the cli environment with the following command fails with the Service: Amazon S3, Message: Forbidden event log.
aws elasticbeanstalk update-environment --region [REGION] --environment-name [ENVIRONMENT_NAME] --version-label [VERSION_LABEL]
Also CloudTrail does not have any error code..
How can I fix it?