Code Monkey home page Code Monkey logo

Comments (3)

tim-finnigan avatar tim-finnigan commented on July 25, 2024

Thanks for reaching out. I'll link the CloudFormation package and deploy command documentation for reference. Have you tried using --parameter-overrides in your deploy command to pass the values?

For example:

invoke.yaml:

AWSTemplateFormatVersion: '2010-09-09'
Description: Invoke main process via Lambda
Parameters:
  FunctionS3Bucket:
    Type: String
    Description: S3 bucket where the Lambda function code is stored
  FunctionS3Key:
    Type: String
    Description: S3 key (file path) of the Lambda function code
  LambdaRoleArn:
    Type: String
    Description: ARN of the IAM role for the Lambda function
Resources:
  InvocationLambda:
    Type: AWS::Lambda::Function
    Properties:
      FunctionName: SampleLambda
      Handler: lambda_handler
      Code:
        S3Bucket:
          Ref: FunctionS3Bucket
        S3Key:
          Fn::Sub: ${FunctionS3Key}
      Runtime: python3.12
      Role:
        Ref: LambdaRoleArn

package command:

 aws cloudformation package \
  --template-file invoke.yaml \     
  --s3-bucket my-bucket \  
  --s3-prefix lambda-package \
  --output-template-file packaged-invoke.yaml

packaged-invoke.yaml:

AWSTemplateFormatVersion: '2010-09-09'
Description: Invoke main process via Lambda
Parameters:
  FunctionS3Bucket:
    Type: String
    Description: S3 bucket where the Lambda function code is stored
  FunctionS3Key:
    Type: String
    Description: S3 key (file path) of the Lambda function code
  LambdaRoleArn:
    Type: String
    Description: ARN of the IAM role for the Lambda function
Resources:
  InvocationLambda:
    Type: AWS::Lambda::Function
    Properties:
      FunctionName: SampleLambda
      Handler: lambda_handler
      Code:
        S3Bucket:
          Ref: FunctionS3Bucket
        S3Key:
          Fn::Sub: ${FunctionS3Key}
      Runtime: python3.12
      Role:
        Ref: LambdaRoleArn

deploy command:

aws cloudformation deploy \ 
  --template-file packaged-invoke.yaml \
  --stack-name my-stack \
  --parameter-overrides \
    FunctionS3Bucket=my-bucket\
    FunctionS3Key=lambda-package/lambda_function.zip \
    LambdaRoleArn=arn:aws:iam::<acccountid>:role/abc

from aws-cli.

amberkushwaha avatar amberkushwaha commented on July 25, 2024

cloudformation package deploy response requested customization p2 and removed labels 13 hours ago.customization p2 and removed investigating in the main stream in it. for the given time period and issues.

from aws-cli.

github-actions avatar github-actions commented on July 25, 2024

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

from aws-cli.

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.