SAM Deployment failed Error- Waiter StackCreateComplete failed: Waiter encountered a terminal failure state - aws-cloudformation

When I try to deploy package on SAM, the very first status comes in cloud formation console is ROLLBACK_IN_PROGRESS after that it gets changed to ROLLBACK_COMPLETE
I have tried deleting the stack and trying again, but every time same issue occurs.
Error in terminal looks like this-
Sourcing local options from ./SAMToolkit.devenv
SAM_PARAM_PKG environment variable not set
SAMToolkit will operate in legacy mode.
Please set SAM_PARAM_PKG in your .devenv file to run modern packaging.
Run 'sam help package' for more information
Runtime: java
Attempting to assume role from AWS Identity Broker using account 634668058279
Assumed role from AWS Identity Broker successfully.
Deploying stack sam-dev* from template: /home/***/1.0/runtime/sam/template.yml
sam-additional-artifacts-url.txt was not found, which is fine if there is no additional artifacts uploaded
Replacing BATS::SAM placeholders in template...
Uploading template build/private/tmp/sam-toolkit.yml to s3://***/sam-toolkit.yml
make_bucket failed: s3://sam-dev* An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
upload: build/private/tmp/sam-toolkit.yml to s3://sam-dev*/sam-toolkit.yml
An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id sam-dev* does not exist
sam-dev* will be created.
Creating ChangeSet ChangeSet-2020-01-20T12-25-56Z
Deploying stack sam-dev*. Follow in console: https://aws-identity-broker.amazon.com/federation/634668058279/CloudFormation
ChangeSet ChangeSet-2020-01-20T12-25-56Z in sam-dev* succeeded
"StackStatus": "REVIEW_IN_PROGRESS",
sam-dev* reached REVIEW_IN_PROGRESS
Deploying stack sam-dev*. Follow in console: https://console.aws.amazon.com/cloudformation/home?region=us-west-2
Waiting for stack-create-complete
Waiter StackCreateComplete failed: Waiter encountered a terminal failure state
Command failed.
Please see the logs above.

I set SQS as event source for Lambda, but didn't provided the permissions like this
- Effect: Allow
Action:
- sqs:ReceiveMessage
- sqs:DeleteMessage
- sqs:GetQueueAttributes
Resource: "*"
in lambda policies.
I found this error in "Events" tab of "CloudFormation" service.

Related

AWS CloudFormation Stack Upgrade fails with "Unable to satisfy 100% MinSuccessfulInstancesPercent requirement"

I tried to update an existing jenkins stack from https://github.com/widdix/aws-cf-templates and just modified the jenkins rpm and the AWS AMI Versions.
But on updating the stack I get this error message:
2019-12-17 19:14:16 UTC+0100 vpc-ci-jenkins UPDATE_ROLLBACK_IN_PROGRESS The following resource(s) failed to update: [MasterASG].
2019-12-17 19:14:15 UTC+0100 MasterASG UPDATE_FAILED Received 1 FAILURE signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement
Anyone an idea what might gone wrong with the update?
There were no changes in the MasterASG section of the template.

Google cloud sql instance unknown error

I have an Cloud-SQL instance restarted by itself for no reason. In any case, the restart failed with the following error:
2018-02-08 16:33:22.552 CST
+ exec /usr/sbin/mysqld --defaults-file=/mysql/my.cnf
Expand all | Collapse all {
insertId: "s=1eb5f90cdd6e4332b0bfd1260e067581;i=21ee;b=4ff35c4064f348848019b0498c04fcfd;m=50ef121;t=564baffd724ea;x=3528d562989af59-0#b1a"
logName: "projects/xxxxxxx/logs/cloudsql.googleapis.com%2Fmysql.err"
receiveTimestamp: "2018-02-08T22:33:31.058969560Z"
resource: {
labels: {
database_id: "xxxxxx:yyyyyyyy"
project_id: "yyyyyyy"
region: "us-central"
}
type: "cloudsql_database"
}
severity: "ERROR"
textPayload: "+ exec /usr/sbin/mysqld --defaults-file=/mysql/my.cnf"
timestamp: "2018-02-08T22:33:22.552734Z"
}
Looking at Cloud-SQL instance console, all action links were greyed out and my instance is showing a yellow warning sign. The operation and logs on the console displayed:
Feb 8, 2018, 3:50:48 PM Restart An unknown error occurred.
Click on users and database tab, I've got this:
Users/Database cannot be loaded from MySQL at this time. Make sure your instance is runnable.
I am unable to restart the instance via console or gcloud cl:
$ gcloud sql instances restart xxxxxxxx
The instance will shut down and start up again immediately if its
activation policy is "always." If "on demand," the instance will start
up again when a new connection request is made.
Do you want to continue (Y/n)? y
ERROR: (gcloud.sql.instances.restart) HTTPError 409: The instance or operation is not in an appropriate state to handle the request.
Query using MySQL workbench via ip is still working but my Firebase Cloud Function was not able to access the MySQL DB via socket path.
Not sure what to do to get back my instance, shall I just create another instance and try to restore?
With Refrence to Google Issues Tracker
It has been fixed.
If any issue persists, please report at Google issue tracker they will re-open to examine.

Capifony SSH Exception on windows - 998 error code

I am trying to setup Capifony to deploy on windows however when running cap deploy I get the following output.
Spec
ruby 2.0.0p481
capifony v2.7.0
The error message
servers: ["homestead.app"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: homestead.app (Net::SSH::Exception: Creation of file mapping failed with error: 998) connection failed for: homestead.app (Net::SSH::Exception: Creation of file mapping failed with error: 998)
If I close down pageant this issue goes away however I require pageant to load the ssh key for the github repo as it required for doing a git ls-remote locally.
Any suggestions/workarounds?
Related issues found
https://github.com/test-kitchen/test-kitchen/issues/448
Resolved my issue by using an older version of ruby (Ruby 1.9.3-p545).

Error when starting Elastic Beanstalk environment

What does this error mean please?
Stack named 'awseb-eea9ufee4ak-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBInstanceLaunchWaitCondition]. (Service: AmazonCloudFormation; Status Code: 400; Error Code: OperationError; Request ID: null)
This error means that launching your environment timed out while waiting to hear back the EC2 instance. The instance did not report whether it successfully launched the environment or not. I would recommend taking snapshot logs to see detailed error messages from the instance.

msdeploy - stop deploy in postsync if presync fails

I am using msdeploy -presync to backup the current deployment of a website in IIS before the -postsync deploys it, however I recently had a situation where the -presync failed (raised a warning due to a missing dll) and the -postsync continued and overwrote the code.
Both the presync and postsync run batch files.
Obviously this is bad as the backup failed so there is no backout route if the deployment has bugs or fails.
Is there anyway to stop the postsync if the presync raises warnings with msdeploy?
Perhaps the issue here is that the presync failure was raised as a warning not an error.
Supply successReturnCodes parameter set to 0 (success return code convention) to presync option such as:
-preSync:runCommand="your script",successReturnCodes=0
More info at: http://technet.microsoft.com/en-us/library/ee619740(v=ws.10).aspx