Facing some issues with AWS EventBridge Application

0

Hi,

I am trying out the sample EventBridge application at this URL I have managed to work this out to an extent on WSL with Ubuntu. Everything has been smooth until I actually deploy the stack using

sam deploy --guided

I have provided the required responses to the above command. I am getting an error. The required resources are not created and deployed. These are probably being rolled back due to the error

For reference I have provided the response from the above command, below

Configuring SAM deploy

 Looking for config file [samconfig.toml] :  Found
        Reading default arguments  :  Success

        Setting default arguments for 'sam deploy'
        =========================================
        Stack Name [Test]: Test
        AWS Region [us-east-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
        #Preserves the state of previously provisioned resources when an operation fails
        Disable rollback [y/N]: N
        Save arguments to configuration file [Y/n]: Y
        SAM configuration file [samconfig.toml]:
        SAM configuration environment [default]:

        Looking for resources needed for deployment:

        Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-22dlzjzisaai
        A different default S3 bucket can be set in samconfig.toml and auto resolution of buckets turned off by setting resolve_s3=False

        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

Error: Unable to upload artifact atmProducer/ referenced by CodeUri parameter of atmProducerFn resource.

S3 Bucket does not exist.

Just for information, the error mention a missing S3 bucket. That's one thing I haven't been able to understand. But I am sure there is something I have missed out. Apologies in advance.

Could anyone guide me in the right direction?

Thanks

2 Answers
0

Looking for config file [samconfig.toml] : Found

You already have samconfig.toml. Did you download and use the working code? (URL could not be verified)

Usually, the first time you do sam deploy --guided, you create an S3 bucket and set the created S3 information in samconfig.toml.

If this is your first time deploying, you can delete samconfig.toml and try it and see.

profile picture
EXPERT
shibata
answered 2 months ago
profile picture
EXPERT
reviewed a month ago
  • Thanks for your reply. I fixed the URL. It was not formatted properly.

  • Thanks, I checked the URL.

    Strangely, S3 is not found, since S3 should be created automatically when this procedure is executed for the first time. I recommend deleting samconfig.toml and trying sam deploy --guided again.

  • I will try this out shortly and let you know. Of course the SAM CLI and framework requires an S3 bucket for uploading the artifacts created. If I delete the configuration file then it will create an S3 bucket and update / create the config file with the name of the S3 bucket, once the process is completed.. That is what I have understood. Thanks once again for your answer

  • I tried deleting samconfig.toml and running sam deploy --guided . It doesn't work. For some reason it is looking for a managed S3 bucket called aws-sam-cli-managed-default-samclisourcebucket-22dlzjzisaai. I am trying to understand why this is happening

0

When you first run the SAM cli, it creates a CloudFormation stack called aws-sam-cli-managed-stack which creates an S3 bucket thats used to managed SAM deployments (unless you specify another S3 bucket) , and a bucket policy. It seems that this bucket has been deleted. You can verify this by looking at the outputs of the managed stack and verifying that the bucket name listed under SourceBucket still exists. To fix this, you can delete the aws-sam-cli-managed-stack and run sam deploy --guided again.

AWS
Asif_H
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions