Code Monkey home page Code Monkey logo

Comments (34)

hoatran888 avatar hoatran888 commented on July 19, 2024 1

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024 1

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

Sorry for the confusion. All the code for that course is in this repo: https://github.com/ryanmurakami/codepipeline-hbfl

You'll find the file you're looking for in the .aws folder.

Thanks!
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

The code for that course is this repo (hbfl). You can also download all the exercise files in Pluralsight under the 'Exercise Files' tab.

What command are you using to run the hbfl-pipeline.template file? Also, is there a more specific error in the 'Events' tab in CloudFormation? I'm not sure what it could be based on the error you shared.

Let me know,
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

Sorry about that. I need to make an update to my course because of that error. The issue is a non-unique S3 bucket name. In your hbfl-pipeline.template file, change the value on line 99 to something unique. Then it should work.

Thanks,
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

It says 'xt-bucket' already exists. You'll need to give the bucket a different name, because S3 bucket names have to be globally unique. Try adding some more words to the bucket name and trying again.

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

Glad you got it working! Yes, the pipeline will run every time there's a merge to master. Yes, the test is supposed to fail the first time, the video will show you how to fix it. For the lambda function, the video shows you how to write it.

Thanks!
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

We don't create the lambda with CloudFormation in the course, just manually by hand. I don't have an example of creating a lambda with CloudFormation handy, but I'm sure you could find an example somewhere.

I wasn't able to see the error, it just shows [image: image.png]. The command to create the elastic beanstalk is what you added with just one change:

aws cloudformation create-stack --stack-name hbfl-eb --template-body
file://hbfl-eb-app.template --capabilities CAPABILITY_IAM

Try that and see if it works. The stack name is hbfl-eb.

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

Usually that appears because of the number of dependencies have been added to the Lambda function. This isn't an error. You just can't view the code in the browser. You can modify it locally and then re-upload as needed.

Does that help?

Thanks,
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

I responded, but then re-read your original message. It looks like you've moved on to the other course. The source for that lambda function is here: https://github.com/ryanmurakami/trash-panda-buffet/blob/master/src/lambda/static.js

It looks like you already uploaded the lambda correctly. When the lambda code is too big, you can only modify it locally and then re-upload. What problem are you having?

Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

You should be able to run the lambda, size doesn't matter there. If you need to modify the code, you would modify it locally and then run npm run deploy again to deploy it out. Is that giving you some error?

Thanks,
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

Got it. No, once a Lambda function has dependencies, you can no longer modify it in the browser. Unfortunately, you have to modify locally and then deploy it. Sorry!

Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

No problem! Let me know if you have anymore questions!

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

ryanmurakami avatar ryanmurakami commented on July 19, 2024

Hi Xuan,

If you create the SQS and lambda function in the same stack, you can just add a reference. If they are not in the same there are two ways.

  1. You could export the SQS ARN:
    a. Output the ARN for the SQS queue from your CloudFormation stack
    b. In your lambda function, use the listExports function from the AWS SDK to find the output value.
  2. Add the SQS ARN as an environment variable in the Lambda function. (you would do this by hand)

Let me know if you have anymore questions!
Ryan

from hbfl.

hoatran888 avatar hoatran888 commented on July 19, 2024

from hbfl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.