AWS::EC2::EnclaveCertificateIamRoleAssociation - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::EC2::EnclaveCertificateIamRoleAssociation

Associates an Amazon Identity and Access Management (IAM) role with an Amazon Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see Amazon Certificate Manager for Nitro Enclaves in the Amazon Nitro Enclaves User Guide.

When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted private key are placed in an Amazon S3 location that only the associated IAM role can access. The private key of the certificate is encrypted with an Amazon managed key that has an attached attestation-based key policy.

To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key, you must grant it permission to call kms:Decrypt on the KMS key returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the Amazon Nitro Enclaves User Guide.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::EnclaveCertificateIamRoleAssociation", "Properties" : { "CertificateArn" : String, "RoleArn" : String } }

YAML

Type: AWS::EC2::EnclaveCertificateIamRoleAssociation Properties: CertificateArn: String RoleArn: String

Properties

CertificateArn

The ARN of the ACM certificate with which to associate the IAM role.

Required: Yes

Type: String

Pattern: ^arn:aws[A-Za-z0-9-]{0,64}:acm:[A-Za-z0-9-]{1,64}:([0-9]{12})?:certificate/.+$

Minimum: 1

Maximum: 1283

Update requires: Replacement

RoleArn

The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate.

Required: Yes

Type: String

Pattern: ^arn:aws[A-Za-z0-9-]{0,64}:iam:.*:([0-9]{12})?:role/.+$

Minimum: 1

Maximum: 1283

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the IAM role and ACM certificate association.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

CertificateS3BucketName

The name of the Amazon S3 bucket to which the certificate was uploaded.

CertificateS3ObjectKey

The Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored. The object key is formatted as follows: role_arn/certificate_arn.

EncryptionKmsKeyId

The ID of the Amazon KMS key used to encrypt the private key of the certificate.

Examples

Associating an IAM role with an ACM certificate

The following example associates IAM role arn:aws:iam::123456789012:role/my-acm-role with ACM certificate arn:aws:acm:us-east-1:123456789012:certificate/123abcde-cdef-abcd-1234-123abEXAMPLE.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "myCertAssociation", "Resources": { "MyEnclaveCertificateIamRoleAssociation": { "Type": "AWS::EC2::EnclaveCertificateIamRoleAssociation", "Properties": { "CertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/123abcde-cdef-abcd-1234-123abEXAMPLE", "RoleArn": "arn:aws:iam::123456789012:role/my-acm-role" } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: myCertAssociation: Type: AWS::EC2::EnclaveCertificateIamRoleAssociation Properties: CertificateArn: "arn:aws:acm:us-east-1:123456789012:certificate/123abcde-cdef-abcd-1234-123abEXAMPLE" RoleArn: "arn:aws:iam::123456789012:role/my-acm-role"